<template>
  <w-tr>
    <template #default>
      <w-td><w-leaf :text="data.name" :expanded="data.expanded" :children="data.children"/></w-td>
      <w-td>{{data.code}}</w-td>
    </template>
    <template #rows>
      <leaf-tr v-for="item in data.children" :key="item.id" :data="item"></leaf-tr>
    </template>
  </w-tr>
</template>

<script>
  export default {
    name: 'leaf-tr',
    props: ['data'],
  }
</script>
